import*as e from"../../core/i18n/i18n.js";import*as r from"../../ui/legacy/legacy.js";const o={recorder:"Recorder",showRecorder:"Show Recorder",startStopRecording:"Start/Stop recording",createRecording:"Create a new recording",replayRecording:"Replay recording",toggleCode:"Toggle code view"},t=e.i18n.registerUIStrings("panels/recorder/recorder-meta.ts",o),c=e.i18n.getLazilyComputedLocalizedString.bind(void 0,t);let n;async function i(){return n||(n=await import("./recorder.js")),n}function a(e,r){return void 0===n?[]:r&&n.RecorderPanel.RecorderPanel.instance().isActionPossible(r)?e(n):[]}r.ViewManager.defaultOptionsForTabs.chrome_recorder=!0,r.ViewManager.registerViewExtension({location:"panel",id:"chrome_recorder",commandPrompt:c(o.showRecorder),title:c(o.recorder),order:90,persistence:"closeable",isPreviewFeature:!0,loadView:async()=>(await i()).RecorderPanel.RecorderPanel.instance()}),r.ActionRegistration.registerActionExtension({category:"Recorder",actionId:"chrome_recorder.create-recording",title:c(o.createRecording),loadActionDelegate:async()=>(await i()).RecorderPanel.ActionDelegate.instance()}),r.ActionRegistration.registerActionExtension({category:"Recorder",actionId:"chrome_recorder.start-recording",title:c(o.startStopRecording),contextTypes:()=>a((e=>[e.RecorderPanel.RecorderPanel]),"chrome_recorder.start-recording"),loadActionDelegate:async()=>(await i()).RecorderPanel.ActionDelegate.instance(),bindings:[{shortcut:"Ctrl+E",platform:"windows,linux"},{shortcut:"Meta+E",platform:"mac"}]}),r.ActionRegistration.registerActionExtension({category:"Recorder",actionId:"chrome_recorder.replay-recording",title:c(o.replayRecording),contextTypes:()=>a((e=>[e.RecorderPanel.RecorderPanel]),"chrome_recorder.replay-recording"),loadActionDelegate:async()=>(await i()).RecorderPanel.ActionDelegate.instance(),bindings:[{shortcut:"Ctrl+Enter",platform:"windows,linux"},{shortcut:"Meta+Enter",platform:"mac"}]}),r.ActionRegistration.registerActionExtension({category:"Recorder",actionId:"chrome_recorder.toggle-code-view",title:c(o.toggleCode),contextTypes:()=>a((e=>[e.RecorderPanel.RecorderPanel]),"chrome_recorder.toggle-code-view"),loadActionDelegate:async()=>(await i()).RecorderPanel.ActionDelegate.instance(),bindings:[{shortcut:"Ctrl+B",platform:"windows,linux"},{shortcut:"Meta+B",platform:"mac"}]});
